package cn.service.impl;


import cn.dao.AccountDao;
import cn.domain.Account;
import cn.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service("accountService")
public class AccountServiceImpl implements AccountService {

    @Autowired
    private AccountDao accountDao;


    @Override
    public List<Account> findAll() {
        List<Account> all = accountDao.findAll();
        return all;
//        System.out.println("业务层：查询所有账户信息");
//        return null;
    }

    @Override
    public void saveAccount(Account account) {

        System.out.println("业务层：保存账户信息");
        accountDao.saveAccount(account);
//        accountDao.saveAccount();
    }
}
